package com.example.Laboratory.Service.Impl;

import com.example.Laboratory.Entity.User;
import com.example.Laboratory.Mapper.UserMapper;
import com.example.Laboratory.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    //登入
    @Override
    public String login(User u) {
        if (userMapper.login(u) != null) {
            return "登入成功";
        } else {
            return "登入失败";
        }
    }
}
